package com.banyuan.课堂练习.Thread;

import java.util.Arrays;
import java.util.concurrent.Callable;

public class Demo1 implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        int[] arr = new int[10];
        for (int i = 0; i < 10; i++) {
            arr[i] = (int) (Math.random() * 100 + 1);
        }
        int max = arr[0];
        for (int i : arr) {
            max = max > i ? max : i;
        }
        System.out.println(Arrays.toString(arr));
        return max;
    }
}
